package com.syq.pojo;

import lombok.Data;
import lombok.ToString;
import org.springframework.util.StringUtils;

@Data
@ToString
public class SysDevice implements CheckNull{

  private String deviceId;
  private String deviceName;
  private long categyId;
  private long bindUserId;
  private long sceneId;
  private java.sql.Timestamp bindTime;
  private long isOnline;
  private java.sql.Timestamp connectTime;
  private java.sql.Timestamp lostConnectTime;
  private java.sql.Timestamp lastControlTime;
  private String currentConnectIp;
  private String connectLocation;
  private long status;


  @Override
  public boolean isEmpty(CheckType type) {
    switch (type){
      case ADD :
        return !StringUtils.hasText(deviceName);
    }
    return false;
  }
}
